

prompt = "If you share your name, we can personalize the messages you see."
prompt += "\nWhat is your first name? "
name = input(prompt)
print(f"\nHello, {name}!")


tips = 'How old are you?'
age =  input(tips)
print(f'{name} is {age} years old')



# 练习 7.1：汽⻋租赁 编写⼀个程序，询问⽤户要租什么样的汽⻋，并
# 打印⼀条消息，如下所⽰。
# Let me see if I can find you a Subaru.
prompt = 'What car would you like to rent?'
car = input(prompt)
print(f'Let me see if I can find you a {car}.')



# 练习 7.2：餐馆订位 编写⼀个程序，询问⽤户有多少⼈⽤餐。如果超
# 过 8 个⼈，就打印⼀条消息，指出没有空桌；否则指出有空桌。
prompt = 'How many people are in your dinner group?'
num = int(input(prompt))
if (num > 8):
    print('Sorry, we do not have a table available')



# 练习 7.3：10 的整数倍 让⽤户输⼊⼀个数，并指出这个数是否是 10
# 的整数倍。

prompt = 'please input a num'
num = int(input(prompt))
if num % 10 == 0:
    print('the num is 10 times')